﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Nirvana
{
    public sealed class SignalHandle
    {
        private LinkedList<SignalDelegate> SignalList;
        private LinkedListNode<SignalDelegate> SignalNodeList;

        public SignalHandle(LinkedList<SignalDelegate> _list, LinkedListNode<SignalDelegate> _nodelist)
        {
            this.SignalList = _list;
            this.SignalNodeList = _nodelist;
        }

        public void Dispose()
        {
            if (this.SignalList != null && this.SignalNodeList != null)
            {
                this.SignalList.Remove(this.SignalNodeList);
                this.SignalNodeList = null;
                this.SignalList = null;
            }
        }
    }
}

